import { requestClient } from '../request'

// 私有消息
export default class UserFollowApi {
    static get inst() {
        return UserFollowApi._inst || (UserFollowApi._inst = new UserFollowApi())
    }
    private static _inst: UserFollowApi
    /**
     * UserFollowApi分页
     * @param params
     */
    getPageList(params: any) {
        return requestClient.get('/stockNetwork/index', {
            params
        })
    }
    // Post上传urlList
    upload(params:any) {
        return (
            requestClient.post(`/stockNetwork/dynamicIpBatchImport`,params)
        )
    }
     // Post上传文件
    upload2(data: { file: File }) {
        // 使用requestClient的put方法，上传文件到/orders/importOrders接口，data为上传的文件，headers为请求头，'Content-Type'为multipart/form-data
        return requestClient.post(
            `/stockNetwork/import`,
            { file: data.file },
            {
                headers: {
                    'Content-Type': 'multipart/form-data'
                }
            }
        )
    }
    // 删除
     delete(ids:any) {
        debugger
        return requestClient.delete<null>(`/stockNetwork/delete/${ids}`)
    }
    
}
